inherited FRM_RelFormaFarmaceutica: TFRM_RelFormaFarmaceutica
  Left = 294
  Top = 57
  Caption = 'FRM_RelFormaFarmaceutica'
  OldCreateOrder = True
  PixelsPerInch = 96
  TextHeight = 13
  inherited rptRelatorio: TRLReport
    Left = 16
    DataSource = dsRelatorio
    Font.Charset = ANSI_CHARSET
    ExpressionParser = RLExpressionParser
    inherited rlTituloAgrupamento: TRLBand
      inherited rlTitulo: TRLLabel
        Left = 236
        Width = 304
        Caption = 'Informa'#231#245'es Sobre o Registro da Forma Farmac'#234'utica '
      end
      inherited lblEmpresaLicenciada: TRLLabel
        BeforePrint = lblEmpresaLicenciadaBeforePrint
      end
    end
    object rlForma: TRLBand
      Left = 38
      Top = 133
      Width = 718
      Height = 27
      AutoSize = True
      BandType = btHeader
      object rlNomeFormaDESCRICAO: TRLDBText
        Left = 0
        Top = 2
        Width = 298
        Height = 25
        DataField = 'DESCRICAO'
        DataSource = dsRelatorio
        Font.Charset = ANSI_CHARSET
        Font.Color = clBlack
        Font.Height = -19
        Font.Name = 'Segoe UI'
        Font.Style = [fsBold]
        ParentFont = False
        Text = 'Forma Farmac'#234'utica: '
      end
    end
    object rlFormaInfo: TRLBand
      Left = 38
      Top = 160
      Width = 718
      Height = 112
      BandType = btHeader
      Borders.Sides = sdCustom
      Borders.DrawLeft = False
      Borders.DrawTop = False
      Borders.DrawRight = False
      Borders.DrawBottom = True
      object RLDBText1: TRLDBText
        Left = 40
        Top = 24
        Width = 201
        Height = 15
        DataField = 'CATEGORIA_FF'
        DataSource = dsRelatorio
        Text = 'Categoria....................: '
      end
      object RLDBText2: TRLDBText
        Left = 40
        Top = 40
        Width = 175
        Height = 15
        DataField = 'GRUPO_FF'
        DataSource = dsRelatorio
        Text = 'Descri'#231#227'o do Grupo..: '
      end
      object RLDBText3: TRLDBText
        Left = 40
        Top = 56
        Width = 173
        Height = 15
        DataField = 'VALIDADE'
        DataSource = dsRelatorio
        Text = 'Validade (dias)...........: '
      end
      object RLDBText4: TRLDBText
        Left = 40
        Top = 72
        Width = 256
        Height = 15
        DataField = 'PERC_TOLERANCIA_MAIS'
        DataSource = dsRelatorio
        Text = '(%) Toler'#226'ncia (+).....: '
      end
      object RLDBText5: TRLDBText
        Left = 40
        Top = 88
        Width = 269
        Height = 15
        DataField = 'PERC_TOLERANCIA_MENOS'
        DataSource = dsRelatorio
        Text = '(%) Toler'#226'ncia (-)......: '
      end
      object RLDBText6: TRLDBText
        Left = 420
        Top = 56
        Width = 161
        Height = 15
        DataField = 'QSP'
        DataSource = dsRelatorio
        Text = 'Utilizar QSP.......................: '
      end
      object RLDBText7: TRLDBText
        Left = 420
        Top = 72
        Width = 260
        Height = 15
        DataField = 'CUSTO_OPERACIONAL'
        DataSource = dsRelatorio
        Text = 'Custo Operacional..........: '
      end
      object RLDBText8: TRLDBText
        Left = 420
        Top = 88
        Width = 226
        Height = 15
        DataField = 'PRECO_MINIMO'
        DataSource = dsRelatorio
        Text = 'Pre'#231'o M'#237'nimo..................: '
      end
      object RLDBText9: TRLDBText
        Left = 420
        Top = 8
        Width = 222
        Height = 15
        DataField = 'LISTAR_PEDIDO'
        DataSource = dsRelatorio
        Text = 'Listar no Pedido...............: '
      end
      object RLDBText10: TRLDBText
        Left = 420
        Top = 24
        Width = 277
        Height = 15
        DataField = 'UTILIZAR_CASA_DECIMAL'
        DataSource = dsRelatorio
        Text = 'Utilizar Casas Decimais...: '
      end
      object RLDBText11: TRLDBText
        Left = 420
        Top = 40
        Width = 189
        Height = 15
        DataField = 'CONTEM'
        DataSource = dsRelatorio
        Text = 'Cont'#234'm.............................: '
      end
      object RLDBText12: TRLDBText
        Left = 40
        Top = 8
        Width = 217
        Height = 15
        DataField = 'INVOLUCRO_TIPO'
        DataSource = dsRelatorio
        Text = 'Tipo de Inv'#243'lucro......: '
      end
    end
    object rlSubUnidadeMedida: TRLSubDetail
      Left = 38
      Top = 272
      Width = 718
      Height = 98
      Borders.Sides = sdCustom
      Borders.DrawLeft = False
      Borders.DrawTop = False
      Borders.DrawRight = False
      Borders.DrawBottom = True
      DataSource = dsConsultaUnidade
      object RLBand9: TRLBand
        Left = 0
        Top = 0
        Width = 718
        Height = 35
        BandType = btHeader
        Borders.Sides = sdCustom
        Borders.DrawLeft = False
        Borders.DrawTop = False
        Borders.DrawRight = False
        Borders.DrawBottom = False
        object RLLabel1: TRLLabel
          Left = 0
          Top = 6
          Width = 270
          Height = 25
          Caption = 'Unidades de Medida Poss'#237'veis'
          Font.Charset = DEFAULT_CHARSET
          Font.Color = clBlack
          Font.Height = -19
          Font.Name = 'Segoe UI'
          Font.Style = [fsBold]
          ParentFont = False
        end
      end
      object bndDetailUnidade: TRLBand
        Left = 0
        Top = 49
        Width = 718
        Height = 14
        AutoSize = True
        Font.Charset = DEFAULT_CHARSET
        Font.Color = clBlack
        Font.Height = -11
        Font.Name = 'Arial'
        Font.Style = []
        ParentFont = False
        BeforePrint = bndDetailUnidadeBeforePrint
        object RLDBText13: TRLDBText
          Left = 96
          Top = -2
          Width = 62
          Height = 14
          DataField = 'DESCRICAO'
          DataSource = dsConsultaUnidade
          Holder = RLLabel43
        end
        object RLDBText14: TRLDBText
          Left = 284
          Top = 0
          Width = 72
          Height = 14
          Alignment = taCenter
          DataField = 'ABREVIACAO'
          DataSource = dsConsultaUnidade
          Holder = RLLabel44
        end
        object RLDBText21: TRLDBText
          Left = 356
          Top = 0
          Width = 84
          Height = 14
          Alignment = taCenter
          DataField = 'ESTADO_FISICO'
          DataSource = dsConsultaUnidade
          Holder = RLLabel45
        end
        object RLDBText27: TRLDBText
          Left = 428
          Top = 0
          Width = 114
          Height = 14
          Alignment = taCenter
          DataField = 'UNID_ESPECIAL_DESC'
          DataSource = dsConsultaUnidade
          Holder = RLLabel47
        end
        object RLDBText15: TRLDBText
          Left = 23
          Top = 0
          Width = 76
          Height = 14
          Alignment = taCenter
          DataField = 'COD_UNIDADE'
          DataSource = dsConsultaUnidade
          Holder = RLLabel2
        end
        object RLDBText16: TRLDBText
          Left = 611
          Top = 0
          Width = 90
          Height = 14
          Alignment = taCenter
          DataField = 'OP_CONVERSAO'
          DataSource = dsConsultaUnidade
          Holder = RLLabel3
        end
        object RLDBText17: TRLDBText
          Left = 514
          Top = 0
          Width = 110
          Height = 14
          Alignment = taCenter
          DataField = 'UNID_PADRAO_DESC'
          DataSource = dsConsultaUnidade
          Holder = RLLabel4
        end
      end
      object RLBand18: TRLBand
        Left = 0
        Top = 35
        Width = 718
        Height = 14
        AutoSize = True
        BandType = btHeader
        Font.Charset = DEFAULT_CHARSET
        Font.Color = clBlack
        Font.Height = -11
        Font.Name = 'Arial'
        Font.Style = [fsBold]
        ParentFont = False
        object RLLabel43: TRLLabel
          Left = 96
          Top = 0
          Width = 153
          Height = 14
          Caption = 'Descri'#231#227'o / Unidade Medida'
        end
        object RLLabel44: TRLLabel
          Left = 288
          Top = 0
          Width = 64
          Height = 14
          Caption = 'Abrevia'#231#227'o'
        end
        object RLLabel45: TRLLabel
          Left = 360
          Top = 0
          Width = 75
          Height = 14
          Caption = 'Estado F'#237'sico'
        end
        object RLLabel47: TRLLabel
          Left = 446
          Top = 0
          Width = 78
          Height = 14
          Caption = 'Unid. Especial'
        end
        object RLLabel2: TRLLabel
          Left = 40
          Top = 0
          Width = 42
          Height = 14
          Caption = 'C'#243'digo'
        end
        object RLLabel3: TRLLabel
          Left = 614
          Top = 0
          Width = 84
          Height = 14
          Caption = 'Op. Convers'#227'o'
        end
        object RLLabel4: TRLLabel
          Left = 533
          Top = 0
          Width = 71
          Height = 14
          Caption = 'Unid. Padr'#227'o'
        end
      end
      object RLBand12: TRLBand
        Left = 0
        Top = 63
        Width = 718
        Height = 26
        BandType = btColumnFooter
        Font.Charset = DEFAULT_CHARSET
        Font.Color = clBlack
        Font.Height = -11
        Font.Name = 'Arial'
        Font.Style = [fsBold]
        ParentFont = False
        object RLDBResult7: TRLDBResult
          Left = 0
          Top = 6
          Width = 280
          Height = 14
          DataFormula = 'count(COD_UNIDADE)'
          DataSource = dsConsultaUnidade
          Text = 'Total de Registros: '
        end
      end
    end
    object RLSubIndicacaoUso: TRLSubDetail
      Left = 38
      Top = 370
      Width = 718
      Height = 98
      Borders.Sides = sdCustom
      Borders.DrawLeft = False
      Borders.DrawTop = False
      Borders.DrawRight = False
      Borders.DrawBottom = True
      DataSource = dsConsultaIndicacao
      object RLBand1: TRLBand
        Left = 0
        Top = 0
        Width = 718
        Height = 35
        BandType = btHeader
        Borders.Sides = sdCustom
        Borders.DrawLeft = False
        Borders.DrawTop = False
        Borders.DrawRight = False
        Borders.DrawBottom = False
        object RLLabel5: TRLLabel
          Left = 0
          Top = 6
          Width = 236
          Height = 25
          Caption = 'Lista de Indica'#231#245'es de Uso'
          Font.Charset = DEFAULT_CHARSET
          Font.Color = clBlack
          Font.Height = -19
          Font.Name = 'Segoe UI'
          Font.Style = [fsBold]
          ParentFont = False
        end
      end
      object bndDetailIndicacao: TRLBand
        Left = 0
        Top = 49
        Width = 718
        Height = 14
        AutoSize = True
        Font.Charset = DEFAULT_CHARSET
        Font.Color = clBlack
        Font.Height = -11
        Font.Name = 'Arial'
        Font.Style = []
        ParentFont = False
        BeforePrint = bndDetailIndicacaoBeforePrint
        object RLDBText18: TRLDBText
          Left = 96
          Top = -2
          Width = 62
          Height = 14
          DataField = 'DESCRICAO'
          DataSource = dsConsultaIndicacao
          Holder = RLLabel6
        end
        object RLDBText23: TRLDBText
          Left = 17
          Top = 0
          Width = 88
          Height = 14
          Alignment = taCenter
          DataField = 'COD_INDICACAO'
          DataSource = dsConsultaIndicacao
          Holder = RLLabel10
        end
      end
      object RLBand3: TRLBand
        Left = 0
        Top = 35
        Width = 718
        Height = 14
        AutoSize = True
        BandType = btHeader
        Font.Charset = DEFAULT_CHARSET
        Font.Color = clBlack
        Font.Height = -11
        Font.Name = 'Arial'
        Font.Style = [fsBold]
        ParentFont = False
        object RLLabel6: TRLLabel
          Left = 96
          Top = 0
          Width = 158
          Height = 14
          Caption = 'Descri'#231#227'o / Indica'#231#227'o de Uso'
        end
        object RLLabel10: TRLLabel
          Left = 40
          Top = 0
          Width = 42
          Height = 14
          Caption = 'C'#243'digo'
        end
      end
      object RLBand4: TRLBand
        Left = 0
        Top = 63
        Width = 718
        Height = 26
        BandType = btColumnFooter
        Font.Charset = DEFAULT_CHARSET
        Font.Color = clBlack
        Font.Height = -11
        Font.Name = 'Arial'
        Font.Style = [fsBold]
        ParentFont = False
        object RLDBResult1: TRLDBResult
          Left = 0
          Top = 6
          Width = 295
          Height = 14
          DataFormula = 'count(COD_INDICACAO)'
          DataSource = dsConsultaUnidade
          Text = 'Total de Registros: '
        end
      end
    end
    object RLSubPosologia: TRLSubDetail
      Left = 38
      Top = 468
      Width = 718
      Height = 98
      Borders.Sides = sdCustom
      Borders.DrawLeft = False
      Borders.DrawTop = False
      Borders.DrawRight = False
      Borders.DrawBottom = True
      DataSource = dsConsultaPosologia
      object RLBand5: TRLBand
        Left = 0
        Top = 0
        Width = 718
        Height = 35
        BandType = btHeader
        Borders.Sides = sdCustom
        Borders.DrawLeft = False
        Borders.DrawTop = False
        Borders.DrawRight = False
        Borders.DrawBottom = False
        object RLLabel7: TRLLabel
          Left = 0
          Top = 6
          Width = 173
          Height = 25
          Caption = 'Lista de Posologias'
          Font.Charset = DEFAULT_CHARSET
          Font.Color = clBlack
          Font.Height = -19
          Font.Name = 'Segoe UI'
          Font.Style = [fsBold]
          ParentFont = False
        end
      end
      object bndDetailPosologia: TRLBand
        Left = 0
        Top = 49
        Width = 718
        Height = 14
        AutoSize = True
        Font.Charset = DEFAULT_CHARSET
        Font.Color = clBlack
        Font.Height = -11
        Font.Name = 'Arial'
        Font.Style = []
        ParentFont = False
        BeforePrint = bndDetailPosologiaBeforePrint
        object RLDBText19: TRLDBText
          Left = 96
          Top = -2
          Width = 62
          Height = 14
          DataField = 'DESCRICAO'
          DataSource = dsConsultaPosologia
          Holder = RLLabel8
        end
        object RLDBText20: TRLDBText
          Left = 15
          Top = 0
          Width = 92
          Height = 14
          Alignment = taCenter
          DataField = 'COD_POSOLOGIA'
          DataSource = dsConsultaPosologia
          Holder = RLLabel9
        end
      end
      object RLBand7: TRLBand
        Left = 0
        Top = 35
        Width = 718
        Height = 14
        AutoSize = True
        BandType = btHeader
        Font.Charset = DEFAULT_CHARSET
        Font.Color = clBlack
        Font.Height = -11
        Font.Name = 'Arial'
        Font.Style = [fsBold]
        ParentFont = False
        object RLLabel8: TRLLabel
          Left = 96
          Top = 0
          Width = 120
          Height = 14
          Caption = 'Descri'#231#227'o / Posologia'
        end
        object RLLabel9: TRLLabel
          Left = 40
          Top = 0
          Width = 42
          Height = 14
          Caption = 'C'#243'digo'
        end
      end
      object RLBand10: TRLBand
        Left = 0
        Top = 63
        Width = 718
        Height = 26
        BandType = btColumnFooter
        Font.Charset = DEFAULT_CHARSET
        Font.Color = clBlack
        Font.Height = -11
        Font.Name = 'Arial'
        Font.Style = [fsBold]
        ParentFont = False
        object RLDBResult2: TRLDBResult
          Left = 0
          Top = 6
          Width = 299
          Height = 14
          DataFormula = 'count(COD_POSOLOGIA)'
          DataSource = dsConsultaUnidade
          Text = 'Total de Registros: '
        end
      end
    end
    object rlSubObservacao: TRLSubDetail
      Left = 38
      Top = 566
      Width = 718
      Height = 64
      Borders.Sides = sdCustom
      Borders.DrawLeft = False
      Borders.DrawTop = False
      Borders.DrawRight = False
      Borders.DrawBottom = True
      DataSource = dsRelatorio
      object RLBand16: TRLBand
        Left = 0
        Top = 0
        Width = 718
        Height = 35
        BandType = btHeader
        Borders.Sides = sdCustom
        Borders.DrawLeft = False
        Borders.DrawTop = False
        Borders.DrawRight = False
        Borders.DrawBottom = False
        object RLLabel41: TRLLabel
          Left = 0
          Top = 6
          Width = 116
          Height = 25
          Caption = 'Observa'#231#245'es'
          Font.Charset = DEFAULT_CHARSET
          Font.Color = clBlack
          Font.Height = -19
          Font.Name = 'Segoe UI'
          Font.Style = [fsBold]
          ParentFont = False
        end
      end
      object RLBand17: TRLBand
        Left = 0
        Top = 35
        Width = 718
        Height = 14
        AutoSize = True
        object RLDBMemo3: TRLDBMemo
          Left = 0
          Top = 0
          Width = 718
          Height = 14
          Align = faClientTop
          DataField = 'OBS'
          DataSource = dsRelatorio
          Font.Charset = DEFAULT_CHARSET
          Font.Color = clBlack
          Font.Height = -11
          Font.Name = 'Arial'
          Font.Style = []
          ParentFont = False
        end
      end
    end
  end
  object sqlRelatorio: TSQLQuery [1]
    MaxBlobSize = -1
    Params = <
      item
        DataType = ftInteger
        Name = 'cod_forma'
        ParamType = ptInput
      end>
    SQL.Strings = (
      'select'
      '    ff.COD_FORMA,'
      '    ff.LIG_COD_EMPRESA,'
      '    ff.LIG_COD_INVOLUCRO_TIPO,'
      '    ff.LIG_COD_OP_RODAPE,'
      '    ff.DESCRICAO,'
      '    ff.VALIDADE,'
      '    ff.PERC_TOLERANCIA_MAIS,'
      '    ff.PERC_TOLERANCIA_MENOS,'
      '    ff.CATEGORIA_FF,'
      '    ff.GRUPO_FF,'
      '    ff.QSP,'
      '    ff.CUSTO_OPERACIONAL,'
      '    ff.PRECO_MINIMO,'
      '    case'
      '      when ff.LISTAR_PEDIDO = '#39'True'#39' then '#39'Sim'#39' else '#39'N'#227'o'#39
      '    end as LISTAR_PEDIDO,'
      '    case'
      
        '      when ff.UTILIZAR_CASA_DECIMAL = '#39'True'#39' then '#39'Sim'#39' else '#39'N'#227 +
        'o'#39
      '    end as UTILIZAR_CASA_DECIMAL,'
      '    case'
      '      when ff.CONTEM = '#39'True'#39' then '#39'Sim'#39' else '#39'N'#227'o'#39
      '    end as CONTEM,'
      '    ff.OBS,'
      '    ff.DATA_CAD,'
      '    ff.DATA_ALTERACAO,'
      '    a.descricao_multiempresa as empresa,'
      '    b.descricao as involucro_tipo'
      'from F_FORMA_FARMACEUTICA ff'
      'left join empresa a on (a.cod_empresa = ff.lig_cod_empresa)'
      
        'left join f_involucro_tipo b on (b.cod_involucro_tipo = ff.lig_c' +
        'od_involucro_tipo)'
      'where ff.cod_forma = :cod_forma')
    SQLConnection = dmGeral.SQLConnectionBD
    Left = 363
    Top = 156
  end
  object dsRelatorio: TDataSource [2]
    DataSet = cdsRelatorio
    Left = 363
    Top = 252
  end
  object cdsRelatorio: TClientDataSet [3]
    Active = True
    Aggregates = <>
    Params = <>
    ProviderName = 'dspRelatorio'
    Left = 363
    Top = 220
    object cdsRelatorioCOD_FORMA: TIntegerField
      Alignment = taCenter
      FieldName = 'COD_FORMA'
      Required = True
    end
    object cdsRelatorioLIG_COD_EMPRESA: TIntegerField
      FieldName = 'LIG_COD_EMPRESA'
      Required = True
    end
    object cdsRelatorioLIG_COD_INVOLUCRO_TIPO: TIntegerField
      FieldName = 'LIG_COD_INVOLUCRO_TIPO'
      Required = True
    end
    object cdsRelatorioLIG_COD_OP_RODAPE: TIntegerField
      FieldName = 'LIG_COD_OP_RODAPE'
    end
    object cdsRelatorioDESCRICAO: TStringField
      FieldName = 'DESCRICAO'
      Required = True
      Size = 100
    end
    object cdsRelatorioVALIDADE: TIntegerField
      FieldName = 'VALIDADE'
    end
    object cdsRelatorioPERC_TOLERANCIA_MAIS: TIntegerField
      FieldName = 'PERC_TOLERANCIA_MAIS'
    end
    object cdsRelatorioPERC_TOLERANCIA_MENOS: TIntegerField
      FieldName = 'PERC_TOLERANCIA_MENOS'
    end
    object cdsRelatorioCATEGORIA_FF: TStringField
      FieldName = 'CATEGORIA_FF'
      Size = 50
    end
    object cdsRelatorioGRUPO_FF: TStringField
      FieldName = 'GRUPO_FF'
      Size = 50
    end
    object cdsRelatorioQSP: TStringField
      FieldName = 'QSP'
      Size = 10
    end
    object cdsRelatorioCUSTO_OPERACIONAL: TFMTBCDField
      FieldName = 'CUSTO_OPERACIONAL'
      DisplayFormat = ',0.00'
      EditFormat = ',0.00'
      currency = True
      Precision = 15
      Size = 2
    end
    object cdsRelatorioPRECO_MINIMO: TFMTBCDField
      FieldName = 'PRECO_MINIMO'
      DisplayFormat = ',0.00'
      EditFormat = ',0.00'
      currency = True
      Precision = 15
      Size = 2
    end
    object cdsRelatorioLISTAR_PEDIDO: TStringField
      FieldName = 'LISTAR_PEDIDO'
      Required = True
      FixedChar = True
      Size = 3
    end
    object cdsRelatorioUTILIZAR_CASA_DECIMAL: TStringField
      FieldName = 'UTILIZAR_CASA_DECIMAL'
      Required = True
      FixedChar = True
      Size = 3
    end
    object cdsRelatorioCONTEM: TStringField
      FieldName = 'CONTEM'
      Required = True
      FixedChar = True
      Size = 3
    end
    object cdsRelatorioOBS: TStringField
      FieldName = 'OBS'
      Size = 10000
    end
    object cdsRelatorioDATA_CAD: TDateField
      FieldName = 'DATA_CAD'
    end
    object cdsRelatorioDATA_ALTERACAO: TDateField
      FieldName = 'DATA_ALTERACAO'
    end
    object cdsRelatorioEMPRESA: TStringField
      FieldName = 'EMPRESA'
      Size = 50
    end
    object cdsRelatorioINVOLUCRO_TIPO: TStringField
      FieldName = 'INVOLUCRO_TIPO'
      Size = 100
    end
    object cdsRelatoriosqlConsultaUnidade: TDataSetField
      FieldName = 'sqlConsultaUnidade'
    end
    object cdsRelatoriosqlConsultaIndicacao: TDataSetField
      FieldName = 'sqlConsultaIndicacao'
    end
    object cdsRelatoriosqlConsultaPosologia: TDataSetField
      FieldName = 'sqlConsultaPosologia'
    end
  end
  object dspRelatorio: TDataSetProvider [4]
    DataSet = sqlRelatorio
    Exported = False
    Left = 363
    Top = 188
  end
  object dsMestre_Detalhe: TDataSource [5]
    DataSet = sqlRelatorio
    Left = 393
    Top = 157
  end
  object sqlConsultaUnidade: TSQLQuery [6]
    DataSource = dsMestre_Detalhe
    MaxBlobSize = -1
    Params = <
      item
        DataType = ftInteger
        Name = 'COD_FORMA'
        ParamType = ptInput
        Size = 4
      end>
    SQL.Strings = (
      'select'
      '    u.COD_UNIDADE,'
      '    u.DESCRICAO,'
      '    u.ABREVIACAO,'
      '    u.UNID_PADRAO,'
      '    case'
      '      when u.unid_padrao = '#39'True'#39' then '#39'SIM'#39' else '#39'NAO'#39
      '    end as UNID_PADRAO_DESC,'
      '    u.UNID_ESPECIAL,'
      '    case'
      '      when u.unid_especial = '#39'True'#39' then '#39'SIM'#39' else '#39'NAO'#39
      '    end as UNID_ESPECIAL_DESC,'
      '    u.FRACIONAR_ESTOQUE,'
      '    case'
      '      when u.FRACIONAR_ESTOQUE = '#39'True'#39' then '#39'SIM'#39' else '#39'NAO'#39
      '    end as FRACIONAR_ESTOQUE_DESC,'
      '    u.PERC_CALCULO,'
      '    case'
      '      when u.PERC_CALCULO = '#39'True'#39' then '#39'SIM'#39' else '#39'NAO'#39
      '    end as PERC_CALCULO_DESC,'
      '    u.OP_CONVERSAO,'
      '    u.ESTADO_FISICO,'
      '    u.VALOR_CORRESPONDENTE,'
      '    u.data_cad,'
      '    u.data_alteracao'
      'from unidade_medida u'
      
        'left join f_forma_unidade_medida a on (a.lig_cod_unidade = u.cod' +
        '_unidade)'
      'where a.lig_cod_forma = :COD_FORMA')
    SQLConnection = dmGeral.SQLConnectionBD
    Left = 426
    Top = 157
    object sqlConsultaUnidadeCOD_UNIDADE: TIntegerField
      FieldName = 'COD_UNIDADE'
      Required = True
    end
    object sqlConsultaUnidadeDESCRICAO: TStringField
      FieldName = 'DESCRICAO'
      Required = True
      Size = 100
    end
    object sqlConsultaUnidadeABREVIACAO: TStringField
      FieldName = 'ABREVIACAO'
      Required = True
      Size = 5
    end
    object sqlConsultaUnidadeUNID_PADRAO: TStringField
      FieldName = 'UNID_PADRAO'
      Size = 5
    end
    object sqlConsultaUnidadeUNID_PADRAO_DESC: TStringField
      FieldName = 'UNID_PADRAO_DESC'
      Required = True
      FixedChar = True
      Size = 3
    end
    object sqlConsultaUnidadeUNID_ESPECIAL: TStringField
      FieldName = 'UNID_ESPECIAL'
      Size = 5
    end
    object sqlConsultaUnidadeUNID_ESPECIAL_DESC: TStringField
      FieldName = 'UNID_ESPECIAL_DESC'
      Required = True
      FixedChar = True
      Size = 3
    end
    object sqlConsultaUnidadeFRACIONAR_ESTOQUE: TStringField
      FieldName = 'FRACIONAR_ESTOQUE'
      Size = 5
    end
    object sqlConsultaUnidadeFRACIONAR_ESTOQUE_DESC: TStringField
      FieldName = 'FRACIONAR_ESTOQUE_DESC'
      Required = True
      FixedChar = True
      Size = 3
    end
    object sqlConsultaUnidadePERC_CALCULO: TStringField
      FieldName = 'PERC_CALCULO'
      Size = 5
    end
    object sqlConsultaUnidadePERC_CALCULO_DESC: TStringField
      FieldName = 'PERC_CALCULO_DESC'
      Required = True
      FixedChar = True
      Size = 3
    end
    object sqlConsultaUnidadeOP_CONVERSAO: TStringField
      FieldName = 'OP_CONVERSAO'
      Size = 15
    end
    object sqlConsultaUnidadeESTADO_FISICO: TStringField
      FieldName = 'ESTADO_FISICO'
      Size = 15
    end
    object sqlConsultaUnidadeVALOR_CORRESPONDENTE: TIntegerField
      FieldName = 'VALOR_CORRESPONDENTE'
      Required = True
    end
    object sqlConsultaUnidadeDATA_CAD: TDateField
      FieldName = 'DATA_CAD'
    end
    object sqlConsultaUnidadeDATA_ALTERACAO: TDateField
      FieldName = 'DATA_ALTERACAO'
    end
  end
  object sqlConsultaIndicacao: TSQLQuery [7]
    DataSource = dsMestre_Detalhe
    MaxBlobSize = -1
    Params = <
      item
        DataType = ftInteger
        Name = 'COD_FORMA'
        ParamType = ptInput
        Size = 4
      end>
    SQL.Strings = (
      'select'
      '    i.cod_indicacao,'
      '    i.descricao,'
      '    i.data_cad,'
      '    i.data_alteracao'
      'from F_INDICACAO_USO i'
      
        'left join f_forma_indicacao_uso a on (a.lig_cod_indicacao = i.co' +
        'd_indicacao)'
      'where a.lig_cod_forma = :cod_forma'
      'order by i.descricao')
    SQLConnection = dmGeral.SQLConnectionBD
    Left = 426
    Top = 188
    object sqlConsultaIndicacaoCOD_INDICACAO: TIntegerField
      Alignment = taCenter
      FieldName = 'COD_INDICACAO'
      Required = True
    end
    object sqlConsultaIndicacaoDESCRICAO: TStringField
      FieldName = 'DESCRICAO'
      Required = True
      Size = 100
    end
    object sqlConsultaIndicacaoDATA_CAD: TDateField
      Alignment = taCenter
      FieldName = 'DATA_CAD'
    end
    object sqlConsultaIndicacaoDATA_ALTERACAO: TDateField
      Alignment = taCenter
      FieldName = 'DATA_ALTERACAO'
    end
  end
  object sqlConsultaPosologia: TSQLQuery [8]
    DataSource = dsMestre_Detalhe
    MaxBlobSize = -1
    Params = <
      item
        DataType = ftInteger
        Name = 'COD_FORMA'
        ParamType = ptInput
        Size = 4
      end>
    SQL.Strings = (
      'select'
      '    p.cod_posologia,'
      '    p.descricao,'
      '    p.data_cad,'
      '    p.data_alteracao'
      'from f_forma_posologia p'
      'where p.lig_cod_forma = :cod_forma'
      'order by p.descricao')
    SQLConnection = dmGeral.SQLConnectionBD
    Left = 425
    Top = 221
    object sqlConsultaPosologiaCOD_POSOLOGIA: TIntegerField
      FieldName = 'COD_POSOLOGIA'
      Required = True
    end
    object sqlConsultaPosologiaDESCRICAO: TStringField
      FieldName = 'DESCRICAO'
      Required = True
      Size = 100
    end
    object sqlConsultaPosologiaDATA_CAD: TDateField
      FieldName = 'DATA_CAD'
    end
    object sqlConsultaPosologiaDATA_ALTERACAO: TDateField
      FieldName = 'DATA_ALTERACAO'
    end
  end
  object cdsConsultaPosologia: TClientDataSet [9]
    Active = True
    Aggregates = <>
    DataSetField = cdsRelatoriosqlConsultaPosologia
    Params = <>
    Left = 457
    Top = 220
    object cdsConsultaPosologiaCOD_POSOLOGIA: TIntegerField
      Alignment = taCenter
      FieldName = 'COD_POSOLOGIA'
      Required = True
    end
    object cdsConsultaPosologiaDESCRICAO: TStringField
      FieldName = 'DESCRICAO'
      Required = True
      Size = 100
    end
    object cdsConsultaPosologiaDATA_CAD: TDateField
      Alignment = taCenter
      FieldName = 'DATA_CAD'
    end
    object cdsConsultaPosologiaDATA_ALTERACAO: TDateField
      Alignment = taCenter
      FieldName = 'DATA_ALTERACAO'
    end
  end
  object dsConsultaPosologia: TDataSource [10]
    DataSet = cdsConsultaPosologia
    Left = 488
    Top = 220
  end
  object dsConsultaIndicacao: TDataSource [11]
    DataSet = cdsConsultaIndicacao
    Left = 488
    Top = 188
  end
  object cdsConsultaIndicacao: TClientDataSet [12]
    Active = True
    Aggregates = <>
    DataSetField = cdsRelatoriosqlConsultaIndicacao
    Params = <>
    Left = 457
    Top = 188
    object cdsConsultaIndicacaoCOD_INDICACAO: TIntegerField
      Alignment = taCenter
      FieldName = 'COD_INDICACAO'
      Required = True
    end
    object cdsConsultaIndicacaoDESCRICAO: TStringField
      FieldName = 'DESCRICAO'
      Required = True
      Size = 100
    end
    object cdsConsultaIndicacaoDATA_CAD: TDateField
      Alignment = taCenter
      FieldName = 'DATA_CAD'
    end
    object cdsConsultaIndicacaoDATA_ALTERACAO: TDateField
      Alignment = taCenter
      FieldName = 'DATA_ALTERACAO'
    end
  end
  object cdsConsultaUnidade: TClientDataSet [13]
    Active = True
    Aggregates = <>
    DataSetField = cdsRelatoriosqlConsultaUnidade
    Params = <>
    Left = 457
    Top = 156
    object cdsConsultaUnidadeCOD_UNIDADE: TIntegerField
      FieldName = 'COD_UNIDADE'
      Required = True
    end
    object cdsConsultaUnidadeDESCRICAO: TStringField
      FieldName = 'DESCRICAO'
      Required = True
      Size = 100
    end
    object cdsConsultaUnidadeABREVIACAO: TStringField
      FieldName = 'ABREVIACAO'
      Required = True
      Size = 5
    end
    object cdsConsultaUnidadeUNID_PADRAO: TStringField
      FieldName = 'UNID_PADRAO'
      Size = 5
    end
    object cdsConsultaUnidadeUNID_PADRAO_DESC: TStringField
      FieldName = 'UNID_PADRAO_DESC'
      Required = True
      FixedChar = True
      Size = 3
    end
    object cdsConsultaUnidadeUNID_ESPECIAL: TStringField
      FieldName = 'UNID_ESPECIAL'
      Size = 5
    end
    object cdsConsultaUnidadeUNID_ESPECIAL_DESC: TStringField
      FieldName = 'UNID_ESPECIAL_DESC'
      Required = True
      FixedChar = True
      Size = 3
    end
    object cdsConsultaUnidadeFRACIONAR_ESTOQUE: TStringField
      FieldName = 'FRACIONAR_ESTOQUE'
      Size = 5
    end
    object cdsConsultaUnidadeFRACIONAR_ESTOQUE_DESC: TStringField
      FieldName = 'FRACIONAR_ESTOQUE_DESC'
      Required = True
      FixedChar = True
      Size = 3
    end
    object cdsConsultaUnidadePERC_CALCULO: TStringField
      FieldName = 'PERC_CALCULO'
      Size = 5
    end
    object cdsConsultaUnidadePERC_CALCULO_DESC: TStringField
      FieldName = 'PERC_CALCULO_DESC'
      Required = True
      FixedChar = True
      Size = 3
    end
    object cdsConsultaUnidadeOP_CONVERSAO: TStringField
      FieldName = 'OP_CONVERSAO'
      Size = 15
    end
    object cdsConsultaUnidadeESTADO_FISICO: TStringField
      FieldName = 'ESTADO_FISICO'
      Size = 15
    end
    object cdsConsultaUnidadeVALOR_CORRESPONDENTE: TIntegerField
      FieldName = 'VALOR_CORRESPONDENTE'
      Required = True
    end
    object cdsConsultaUnidadeDATA_CAD: TDateField
      FieldName = 'DATA_CAD'
    end
    object cdsConsultaUnidadeDATA_ALTERACAO: TDateField
      FieldName = 'DATA_ALTERACAO'
    end
  end
  object dsConsultaUnidade: TDataSource [14]
    DataSet = cdsConsultaUnidade
    Left = 487
    Top = 156
  end
  object RLExpressionParser: TRLExpressionParser [15]
    Left = 776
    Top = 46
  end
  inherited RLXLSFilter1: TRLXLSFilter
    Left = 776
  end
  inherited RLRichFilter1: TRLRichFilter
    Left = 776
  end
  inherited RLHTMLFilter1: TRLHTMLFilter
    Left = 776
  end
  inherited RLPDFFilter1: TRLPDFFilter
    Left = 776
  end
end
